;------------------------------------------------------------------------------
;register definition for SH88F516 2010 V1.0
;------------------------------------------------------------------------------
;note:
;------------------------------------------------------------------------------
;******************************************************************************
;/*SFR DEFINITION*/
;******************************************************************************
;;;;;CPU;;;;;
ACC		DATA	0E0H                  										B		DATA	0F0H                  										PSW		DATA	0D0H                  										DPL		DATA	82H	;// DPL       									DPH		DATA	83H	;// DPH
SP		DATA	81H	      										
AUXC		DATA	0F1H	;// AUXC REGISTER	
DPL1		DATA	84H   
DPH1		DATA	85H  
INSCON		DATA	86H                   										                  										
;;;;;Power;;;;;		
PCON		DATA	87H                   			SUSLO		DATA	8EH
				
;;;;;Clock;;;;;
CLKCON		DATA	0B2H

;;;;;Flash;;;;;			
IB_OFFSET	DATA	0FBH
IB_DATA		DATA	0FCH
IB_CON1		DATA	0F2H
IB_CON2		DATA	0F3H
IB_CON3		DATA	0F4H
IB_CON4		DATA	0F5H
IB_CON5		DATA	0F6H
XPAGE		DATA	0F7H
FLASHCON	DATA	0A7H

;;;;;Reset & WDT;;;;;        	
RSTSTAT		DATA	0B1H	

;;;;;Iterrupt;;;;;        	
IEN0		DATA	0A8H
IEN1		DATA	0A9H
IENC		DATA	0BAH
IPL0		DATA	0B8H
IPL1		DATA	0B9H
IPH0		DATA	0B4H
IPH1		DATA	0B5H
EXF0		DATA	0AAH
EXF1		DATA	0D8H

;;;;;TIMER 0/1;;;;;
TCON		DATA	88H
TMOD		DATA	89H
TH0		DATA	8CH
TL0		DATA	8AH
TH1		DATA	8DH
TL1		DATA	8BH
TCLK_S		DATA	0CEH

;;;;;TIMER2;;;;;
T2CON		DATA	0C8H
T2MOD		DATA	0C9H
RCAP2L		DATA	0CAH
RCAP2H		DATA	0CBH
TL2		DATA	0CCH
TH2		DATA	0CDH

;;;;;LPD;;;;;
LPDCON		DATA	0B3H

;;;;;IO Port;;;;;
P0		DATA	80H
P1		DATA	90H
P2		DATA	0A0H
P3		DATA	0B0H
P4		DATA	0C0H   ;;;
P0M0		DATA	0E9H
P0M1		DATA	0E1H
P1M0		DATA	0EAH
P1M1		DATA	0E2H  ;;;
P2M0		DATA	0EBH
P2M1		DATA	0E3H  ;;;
P3M0		DATA	0ECH
P3M1		DATA	0E4H  ;;;
P4M0		DATA	0EDH
P4M1		DATA	0E5H  ;;;
        	
;;;;;EUART 0/1;;;;;        	
SCON		DATA	98h
SBUF   		DATA	99h
SADDR		DATA	9AH
SADEN		DATA	9BH

SCON1		DATA	0E8H
SBUF1		DATA	9DH
SADDR1		DATA	9EH
SADEN1		DATA	9FH
SBRT0		DATA	9CH
SBRT1		DATA	0A4H
        	
;;;;;SPI;;;;;        	
SPSTA		DATA	0F8H
SPCON		DATA	0A2H
SPDAT		DATA	0A3H

;;;;;ADC;;;;;
ADCON		DATA	93H
ADCT		DATA	94H
ADCH		DATA	95H
ADDL		DATA	96H
ADDH		DATA	97H

;;;;;PWM;;;;;        	
PWM0CON	DATA	0D9H
PWM1CON	DATA	0DAH
PWM2CON	DATA	0DBH
PWM0P		DATA	0D1H
PWM1P		DATA	0D2H
PWM2P		DATA	0D3H
PWM0D		DATA	0C1H
PWM1D		DATA	0C2H
PWM2D		DATA	0C3H

;;;;;CMP;;;;;        	
CMPCON0		DATA	91H
CMPCON1		DATA	92H

;;;;;ISP;;;;;        	
ISPLO		DATA	0A5H
ISPCON		DATA	0A6H

;/*SFR FINISHED HERE*/

;/*SFR BIT DEFINITION*/
;/*  PSW   */
CY 		BIT		0xD7;
AC 		BIT		0xD6;
F0 		BIT		0xD5;
RS1 		BIT		0xD4;
RS0 		BIT		0xD3;
OV 		BIT		0xD2;
F1 		BIT		0XD1;
P 		BIT		0xD0;

;/*  T2CON  */
TF2 		BIT		0xCF;
EXF2 		BIT		0xCE;
RCLK 		BIT		0xCD;
TCLK 		BIT		0xCC;
EXEN2 		BIT		0xCB;
TR2 		BIT		0xCA;
C_T2		BIT		0xC9;
CP_RL2		BIT		0xC8;

;/*  IPL0   */ 
PADCL		BIT		0xBE;
PT2L 		BIT		0xBD;
PS0L 		BIT		0xBC;
PT1L 		BIT		0xBB;
PX1L 		BIT		0xBA;
PT0L 		BIT		0xB9;
PX0L 		BIT		0xB8;

;/*  IEN0   */
EA 		BIT		0xAF;
EADC 		BIT		0xAE;
ET2 		BIT		0xAD;
ES0 		BIT		0xAC;
ET1 		BIT		0xAB;
EX1 		BIT		0xAA;
ET0 		BIT		0xA9;
EX0 		BIT		0xA8;

;/*  SCON  */
SM0_FE 		BIT		0x9F;
SM1_RXOV 	BIT		0x9E;
SM2_TXCOL	BIT		0x9D;
REN 		BIT		0x9C;
TB8		BIT		0x9B;
RB8		BIT		0x9A;
TI		BIT		0x99;
RI		BIT		0x98;

;/*  EXF1  */
IF40 		BIT		0xD8
IF41 		BIT		0xD9
IF42 		BIT		0xDA
IF43 		BIT		0xDB
IF44 		BIT		0xDC
IF45 		BIT		0xDD
IF46 		BIT		0xDE
IF47 		BIT		0xDF

;/*  SCON1  */
S1_SM0_FE 	BIT		0xEF;
S1_SM1_RXOV 	BIT		0xEE;
S1_SM2_TXCOL	BIT		0xED;
S1_REN 		BIT		0xEC;
S1_TB8		BIT		0xEB;
S1_RB8		BIT		0xEA;
S1_TI		BIT		0xE9;
S1_RI		BIT		0xE8;

;/*  TCON  */
TF1 		BIT		 0x8F;
TR1 		BIT		 0x8E;
TF0 		BIT		 0x8D;
TR0 		BIT		 0x8C;
IE1 		BIT		 0x8B;
IT1 		BIT		 0x8A;
IE0 		BIT		 0x89;
IT0 		BIT		 0x88;

;/* SPSTA */
SPEN		BIT		 0xFF;
SPIF		BIT		 0xFE;
MODF		BIT		 0xFD;
WCOL		BIT		 0xFC;
RXOV		BIT		 0xFB;

;/*SFR BIT DEFINITION END*/

